package com.u2ds.core.thymeleaf.dialect;

import java.util.Map;

import org.thymeleaf.context.IProcessingContext;
import org.thymeleaf.spring4.dialect.SpringStandardDialect;

import com.u2ds.core.thymeleaf.expression.Cookie;


public class ThymeleafExtendDialect extends SpringStandardDialect {
	public static final String COOKIES_EXPRESSION_OBJECT_NAME = "cookie";

	@Override
	public Map<String, Object> getAdditionalExpressionObjects(IProcessingContext processingContext) {
		final Map<String, Object> additionalExpressionObjects = super.getAdditionalExpressionObjects(processingContext);
        additionalExpressionObjects.put(COOKIES_EXPRESSION_OBJECT_NAME, new Cookie(processingContext));
        return additionalExpressionObjects;
	}
}
